import request from '@/utils/request';

// 列表
export async function externalList(data) {
  return request('/example/addExternal/listView', {
    method: 'POST',
    data,
  });
}

// 新增
export async function addExternal(data) {
  return request('/example/addExternal/listAdd', {
    method: 'POST',
    data,
  });
}

// 编辑
export async function editExternal(data) {
  return request('/example/addExternal/listEdit', {
    method: 'POST',
    data,
  });
}

// 单条详情
export async function listItemDetail(params) {
  return request('/example/addExternal/listItem', {
    method: 'GET',
    params,
  });
}

// 删除
export async function removeExternal(params) {
  return request(`/example/addExternal/listRemove?id=${params.id}`, {
    method: 'POST',
  });
}
